#include "app.h"
#include "page_manager.h"
#include "home.h"
#include "speed.h"
#include "distance.h"


// 注册所有页面描述符
static PageDescriptor pages[3];

void ui_init(void) {
	pages[0] = home_page;
    pages[1] = speed_page;
    pages[2] = distance_page;
	
    PageManager_Init(pages, sizeof(pages)/sizeof(PageDescriptor));

    // 默认切换到首页
    PageManager_SwitchPage(PAGE_ID_HOME);
}